//
//  MHComicIntroductionCell.m
//  ManHua
//
//  Created by 赵永泉 on 15/10/26.
//  Copyright © 2015年 蓝欧科技. All rights reserved.
//

#import "MHComicIntroductionCell.h"
#import <UIImageView+WebCache.h>

@interface MHComicIntroductionCell ()
@property (weak, nonatomic) IBOutlet UIImageView *picture;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *stateLabel;
@end

@implementation MHComicIntroductionCell

- (void)awakeFromNib {
    self.contentView.layer.cornerRadius = 8;
    self.contentView.layer.borderWidth = 1;
    self.contentView.layer.borderColor = [[UIColor lightGrayColor] CGColor];
}

- (void)setComicIntroduct:(MHComicIntroduct *)comicIntroduct
{
    _comicIntroduct = comicIntroduct;
    self.titleLabel.text = comicIntroduct.BookName;
    [self.picture sd_setImageWithURL:[NSURL URLWithString:comicIntroduct.BookIconOtherURL] placeholderImage:[UIImage imageNamed:@"39a67b82b2b7d0a2273cbedacaef76094a369a16.jpg"]];
    if ([comicIntroduct.BookStateName isEqualToString:@"已完结"]) {
        self.stateLabel.text = comicIntroduct.BookStateName;
    }
    else
    {
        self.stateLabel.text = comicIntroduct.BookUpdateSection;
    }
}

@end
